#include "mytools.h"
#include <iostream>

/// @brief 打印一条横线
void print_line() {
  int line_width = 40;
  for (int i = 0; i < line_width; i++) {
    std::cout << "-";
  }
  std::cout << std::endl;
}

/// @brief 打印标题
/// @details 因为打印字面量，需要 const std::string &str
/// @param str
void print_title(const std::string &str) {
  // 打印字符串
  print_line();
  // 把 str 大写化
  std::string str_upper = str;
  for (int i = 0; i < str_upper.size(); i++) {
    str_upper[i] = toupper(str_upper[i]);
  }
  std::cout << str_upper << std::endl;
  print_line();
}
